package com.czwx.bee.base.web.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonPageQuery implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Min(value = 1, message = "页数必须大于0")
	@ApiModelProperty(value="当前页码",name="page",example="1",position = 100)
	private Integer page = 1;
	@ApiModelProperty(value="当前页面条数",name="size",example="10",position = 101)
	@Min(value = 1, message = "每页条数必须大于0")
	private Integer size = 10;
	@ApiModelProperty(value="排序类型",name="direction",example="ASC",position = 102)
	private String direction = "ASC";
	@ApiModelProperty(value="排序字段",name="properties",example="id",position = 103)
	private String properties = "id";

}